<!DOCTYPE html>
<html>
<head>
    <title>实验室表</title>
		<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
			<#if shiro.hasPermission("work:laboratory:save")>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("work:laboratory:update")>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<#if shiro.hasPermission("work:laboratory:delete")>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">

            <div class="form-group">
                <div class="col-sm-2 control-label">申请人</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="laboratory.applyUser" placeholder="申请人"/>
                </div>
            </div>
            <div class="form-group date">
                <div class="col-sm-2 control-label">申请时间</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" id="datepicker" v-model="laboratory.applyTime" placeholder="申请时间"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">申请内容</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="laboratory.applyContent" placeholder="申请内容"/>
                </div>
            </div>
            <div class="form-group date">
                <div class="col-sm-2 control-label">开始时间</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" id="datepicker_1" v-model="laboratory.startTime" placeholder="开始时间"/>
                </div>
            </div>
            <div class="form-group date">
                <div class="col-sm-2 control-label">结束时间</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" id="datepicker_2" v-model="laboratory.endTime" placeholder="结束时间"/>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label">状态</div>
                <label class="radio-inline">
                    <input type="radio" name="status" value="1" v-model="laboratory.applyStatus"/> 禁用
                </label>
                <label class="radio-inline">
                    <input type="radio" name="status" value="0" v-model="laboratory.applyStatus"/> 正常
                </label>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label">申请院系</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="laboratory.applyDepartment" placeholder="申请院系"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">申请房间</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="laboratory.applyRoom" placeholder="申请房间"/>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>
<script>
    //Date picker
    $('#datepicker').datepicker({
        autoclose: true
    })

    //Date picker
    $('#datepicker_1').datepicker({
        autoclose: true
    })

    //Date picker
    $('#datepicker_2').datepicker({
        autoclose: true
    })
</script>
<script src="${request.contextPath}/statics/js/modules/work/laboratory.js?_${.now?long}"></script>
</body>
</html>